package edu.hunau.cxb19.basic.class07;

/**
 *
 * @author hb
 *
 *         2020-02-17 16:05:24
 */
public class ArraysDemo {
	public static void main(String[] args) {
		initArrays();
	}

	public static void initArrays() {
		// 实例化一个二维数组
		int[][] arrs = { { 1 }, { 21, 22 }, { 31, 32, 33 }, { 41, 42, 43, 44 } };

		for (int rows = 0; rows < arrs.length; rows++) {
			for (int cos = 0; cos < arrs[rows].length; cos++) {
				System.out.print(arrs[rows][cos] + " ");
			}
			System.out.println();

		}

		int[][] arrs01 = new int[3][];
		arrs01[0] = new int[] { 1 };
		arrs01[1] = new int[] { 21, 22 };
		arrs01[2] = new int[] { 31, 32, 33 };
	}
}
